# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-plasma
pkgname=drkonqi
pkgver=5.27.10
pkgrel=0
pkgdesc="The KDE crash handler"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://kde.org/plasma-desktop/"
license="GPL-2.0-or-later"
depends="
	kirigami2
	kitemmodels5
	"
makedepends="
	extra-cmake-modules
	kcompletion5-dev
	kconfigwidgets5-dev
	kcoreaddons5-dev
	kcrash5-dev
	kdeclarative5-dev
	ki18n5-dev
	kidletime5-dev
	kio5-dev
	kjobwidgets5-dev
	knotifications5-dev
	kservice5-dev
	kuserfeedback-dev
	kwallet5-dev
	kwidgetsaddons5-dev
	kxmlrpcclient5-dev
	qt5-qtbase-dev
	qt5-qtx11extras-dev
	samurai
	syntax-highlighting5-dev
	"

case "$pkgver" in
	*.90*) _rel=unstable;;
	*) _rel=stable;;
esac
_repo_url="https://invent.kde.org/plasma/drkonqi.git"
source="https://download.kde.org/$_rel/plasma/$pkgver/drkonqi-$pkgver.tar.xz"
subpackages="$pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_TESTING=ON
	cmake --build build
}

check() {
	# connectiontest requires a network connection
	ctest --test-dir build --output-on-failure -E "connectiontest"
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
b53c6ebd2951b276971bdb9c4feb4ce885daf68176b0004396b046bd8e245b62457b62d07465b39d637095f9d4b779ea31535aaa6ee68855aa8cb5a48802857f  drkonqi-5.27.10.tar.xz
"
